# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer:
pkgname=libabw
pkgver=0.1.3
pkgrel=0
pkgdesc="Import filter and tools for AbiWord documents"
url="https://wiki.documentfoundation.org/DLP/Libraries/libabw"
arch="all"
license="MPL-2.0"
makedepends="doxygen gperf perl librevenge-dev libxml2-dev zlib-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://dev-www.libreoffice.org/src/libabw/libabw-$pkgver.tar.xz"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	# workaround for boost 1.59
	export CPPFLAGS='-DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED'
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	amove usr/bin
}

sha512sums="0d2646e1bad1e11b3da43714ac5931fc67ffdbc4e7a25a44ef5b6e6a41de1e0ae14596b4a87cceb07bf56dbbe9344622b3d60afcb054ee0ab8577ca8e9b5c289  libabw-0.1.3.tar.xz"
